{% extends 'base.html' %}{% load i18n avatar_exists %}
{% block extratitle %}Plugins planet{% endblock %}
{% block extracss %}
<!--link type="text/css" href="/static/style/planet.css" rel="stylesheet" /-->
{% endblock %}
{% block app_title %}
<h2>{% trans "QGIS Planet" %}</h2>
{% endblock %}


{% block menu %}
{{ block.super }}
<div class="module_menu">
  <div id="paginate">
    <p class="text-center">Page {{ page }} of {{ pages }} ({% blocktrans count hits as posts %}{{ posts }} post{% plural %}{{ posts }} posts{% endblocktrans %})</p>
    <ul class="pager">
      {% if has_previous %}
      <li><a href="?page={{ previous }}">&lt;&lt;</a></li>
      {% endif %}
      {% if has_next %}
      <li><a href="?page={{ next }}">&gt;&gt;</a></li>
      {% endif %}
    </ul>
    <ul>
      {% if user %}
      <li class="username"><a href="{{ user.feed.link }}">{{ user.name }}</a>&nbsp;{% trans "talks about" %} »</li>
      {% endif %}
      {% if tag %}
      <li class="tagname">{{ tag.name }}</li>
      {% endif %}
    </ul>
  </div>
  <div id="feed_list">
<h4>{% trans "Blog List" %}</h4>

{% for feed in subscribers %}
<p>
<a href="{{ feed.feed.feed_url }}"
{% if feed.feed.last_modified %}
title="{% blocktrans with feed.feed.last_modified as last_modified %}feed (last modified: {{ last_modified }}){% endblocktrans %}"
{% else %}
title="{% trans "feed" %}"
{% endif %}
>
<img src="{{ media_url }}/img/feed.png" alt="feed"></a>
<a class="nombre" href="{{ site.url }}/user/{{ feed.feed.id }}"
title="{{ feed.feed.title }}">{{ feed.name }}</a></li>
{% endfor %}
</ul>
</div>

<div id="tags">
<h4>Tags</h4>
    <ul id="cloud">
    {% for tag in tagcloud %}
      <li><a
      {% if user_id %}
      href="{{ site.url }}/user/{{ user_id }}/tag/{{ tag.tagname|urlencode }}/"
      {% else %}
      href="{{ site.url }}/tag/{{ tag.tagname|urlencode }}/"
      {% endif %}
      title="{% blocktrans count tag.count as posts %}{{ posts }} post{% plural %}{{ posts }} posts{% endblocktrans %}"
      class="cloud_{{ tag.weight }}">{{ tag.tagname }}</a></li>
    {% endfor %}
    </ul>
</div>
<p>
{% trans "Last update" %}:<br/>
<b>{{ last_modified }}</b>
<br/>
</p>

  <div id="buttons">
    <a href="{{ site.url }}/feed/rss/" title="RSS 2.0 feed"><img src="{{ media_url }}/img/button-rss.png"/></a> &bull;
    <a href="http://www.djangoproject.com/"><img src="http://media.djangoproject.com/img/badges/djangosite80x15.gif" border="0" alt="A Django site." title="A Django site."></a> &bull;
    <img src="{{ media_url }}/img/button-hacker.png"/><br/>
    <a href="{{ site.url }}/feed/atom/" title="Atom 1.0 feed"><img src="{{ media_url }}/img/button-atom.png"/></a> &bull;
    <a href="{{ site.url }}/opml/" title="OPML"><img src="{{ media_url }}/img/button-opml.png"/></a> &bull;
    <a href="{{ site.url }}/foaf/" title="FOAF"><img src="{{ media_url }}/img/button-foaf.png"/></a>
  </div>

  {% if user %}
  <div id="usertags">
      <ul>
      {% for tag in tagcloud %}
        <li><a
        {% if user_id %}
        href="{{ site.url }}/user/{{ user_id }}/tag/{{ tag.tagname|urlencode }}/"
        {% else %}
        href="{{ site.url }}/tag/{{ tag.tagname|urlencode }}/"
        {% endif %}
        title="{% blocktrans count tag.count as posts %}{{ posts }} post{% plural %}{{ posts }} posts{% endblocktrans %}"
        class="cloud_{{ tag.weight }}">{{ tag.tagname }}</a></li>
      {% endfor %}
      </ul>
  </div>
  {% endif %}
</div>
{% endblock %}

{% block content %}


<div id="content">

{% for item in object_list %}

  <div class="post">
  {% ifchanged %}
  <!-- {{ item.date_modified|date:"F j, Y" }} -->
  {% if item.subscriber.shortname|avatar_exists %}
  <div class="avatar">
    <img src="{{ media_url }}/img/faces/{{ item.subscriber.shortname}}.png" alt="">
    <br/>
  </div>
  {% endif %}
  {% endifchanged %}

  {% if item.title %}
  <h1 class="post-title"><a href="{{ item.link }}">{{ item.title }}</a></h1>
  {% else %}
  <h1 class="post-title"> {{ item.subscriber.name }}</h1>
  {% endif %}
  {% ifchanged %}
  <div class="post-meta"> <span class="date">{{ item.date_modified|date:"F j, Y" }}</span> <span class="name">{{ item.subscriber.name }}</span><br/></div>
  {% endifchanged %}
  <div class="post-content">
    <p>{{ item.content|safe }}</p>
    <div class="post-meta">
      <a href="{{ item.link }}">
      {% if item.author %}{% blocktrans with item.author as author %}by {{ author }} at{% endblocktrans %}{% endif %}
      {{ item.date_modified|date:"g:i A" }}</a>
      {% for tag in item.qtags %}
          {% if forloop.first %}{% trans "under" %}{% endif %}
          <a href="{{ site.url }}/tag/{{ tag.name }}">{{ tag.name }}</a>
          {% if not forloop.last %}, {% endif %}
      {% endfor %}
      {% if item.comments %}
        <a href="{{ item.comments }}">({% trans "Comments" %})</a>
      {% endif %}
    </div>
  </div>
  </div>
{% endfor %}
</div>
{% comment %}
<div id="sidebar">
<h4>{{ site.name }}</h4>

{{ site.welcome|safe }}

{% endcomment %}
{% comment %}
<h4>
{% if user_id %}
  {% blocktrans with user.name as person %}What {{ person }} talks about{% endblocktrans %}
{% else %}
  {% blocktrans %}What people talk about{% endblocktrans %}
{% endif %}
</h4>

<div id="tags">
    <ul id="cloud">
    {% for tag in tagcloud %}
      <li><a
      {% if user_id %}
      href="{{ site.url }}/user/{{ user_id }}/tag/{{ tag.tagname|urlencode }}/"
      {% else %}
      href="{{ site.url }}/tag/{{ tag.tagname|urlencode }}/"
      {% endif %}
      title="{% blocktrans count tag.count as posts %}{{ posts }} post{% plural %}{{ posts }} posts{% endblocktrans %}"
      class="cloud_{{ tag.weight }}">{{ tag.tagname }}</a></li>
    {% endfor %}
    </ul>
</div>

<h4>{% trans "Meta" %}</h4>
<p>
{% trans "Last update" %}:<br/>
<b>{{ last_modified }}</b>
<br/>
</p>

<h4>{% trans "People" %}</h4>

<ul class="suscriptores">
{% for feed in subscribers %}
<li>
<a href="{{ feed.feed.feed_url }}"
{% if feed.feed.last_modified %}
title="{% blocktrans with feed.feed.last_modified as last_modified %}feed (last modified: {{ last_modified }}){% endblocktrans %}"
{% else %}
title="{% trans "feed" %}"
{% endif %}
>
<img src="{{ media_url }}/img/feed.png" alt="feed"></a>
<a class="nombre" href="{{ site.url }}/user/{{ feed.feed.id }}"
title="{{ feed.feed.title }}">{{ feed.name }}</a></li>
{% endfor %}
</ul>

<h4>{% trans "Greetings" %}</h4>
{{ site.greets|safe }}

</div>
{% endcomment %}

<div id="paginate">
<ul class="pager">

{% if has_previous %}
<li><a href="?page={{ previous }}">&lt;&lt;</a></li>
{% endif %}
<li>
  Page {{ page }} of {{ pages }} (
    {% blocktrans count hits as posts %}{{ posts }} post{% plural %}{{ posts }} posts{% endblocktrans %}
  )
</li>
{% if has_next %}
<li><a href="?page={{ next }}">&gt;&gt;</a></li>
{% endif %}
{% if user %}
<li class="username"><a href="{{ user.feed.link }}">{{ user.name }}</a></li>
{% endif %}
{% if tag %}
<li class="tagname">{{ tag.name }}</li>
{% endif %}
</ul>
</div>
<p class="text-center">
<a href="#top">
<i class="icon-arrow-up"></i> {% trans "Back to Top" %}
</a>
</p>
{% endblock %}

